Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Problem while importing the data into sql server 2005 .

Problem while importing the data into sql server 2005 .

Scheduled Pinned Locked Moved Database
databasequestioncsharpsql-server
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Pankaj Garg
    wrote on last edited by
    #1

    Hi, My front end is VB.net 2008. Database - sql server 2005 I have two import processes. In both process there are two tables where insertion updation takes place. After running both the process simultaneously, I am facing the following crash Transaction (Process ID 81) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction This is the exception, which is coming in between the simultaneous import process. I then used an alternative to resolve this problem. When ever this exception comes, I resend te control(at front end) from catch block to the beginning of the function, this is letting the second process to complete and as I mentioned the control again starts to execute the process from the scratch , it do the work nicely now for first process also. Now both the imports are working fine. For both the processes, I am using the Begin , Commit , Rollback Transaction. Is it enough? Please let me know if you face any problem in understanding the question.

    K 1 Reply Last reply
    0
    • P Pankaj Garg

      Hi, My front end is VB.net 2008. Database - sql server 2005 I have two import processes. In both process there are two tables where insertion updation takes place. After running both the process simultaneously, I am facing the following crash Transaction (Process ID 81) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction This is the exception, which is coming in between the simultaneous import process. I then used an alternative to resolve this problem. When ever this exception comes, I resend te control(at front end) from catch block to the beginning of the function, this is letting the second process to complete and as I mentioned the control again starts to execute the process from the scratch , it do the work nicely now for first process also. Now both the imports are working fine. For both the processes, I am using the Begin , Commit , Rollback Transaction. Is it enough? Please let me know if you face any problem in understanding the question.

      K Offline
      K Offline
      knagnayak
      wrote on last edited by
      #2

      Even we had deadlock proplem in one of our SQl Job. We did following. Used Begin Try End Try block & Begin catch End catch block. Use a flag in the permanent table which indicated processed or not. When trying to rerun run only those which is not processed. This way second time when you run it processes only which are not processed.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups