Hi 2009/6/20 Cesar Sanz <[email protected]>
> > > Question: > *********** > The table that I am inserting in is being monitored by another process ( a > service), but I see the table is locked when inserting > and my services is reading the table each 2 seconds. > > What kind of problem will I have in these scenarios: > > 1. If I am inserting, will my service be hang? > 2. If I am reading the table from my sevice, will my insertion fails? > *********** > Generally it depends on the isolation level. If you have default (read-committed) and have uncommitted changes (which you have, because IDENTITY-fields require to call insert immediately, then SQL-Server blocks other connections from reading the table. The service will therefore eventually get a timeout when you are inserting some 60,000 records (as the default timeout is 30 seconds). If it is a separate application inserting the data, you can change the transaction isolation to read-uncommited. Then the service can read the table at any time. -Markus --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Castle Project Users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/castle-project-users?hl=en -~----------~----~----~----~------~----~------~--~---
