Re: How to reliably ensure that only one set of rows is bulk imported into a table at a time



On Jun 27, 2:57 pm, Roy Harvey <roy_har...@xxxxxxxx> wrote:
On Wed, 27 Jun 2007 19:40:12 -0000, Weyus <w...@xxxxxxx> wrote:
It looks like if I do a

SELECT blah FROM TABLE WITH (TABLOCK XLOCK)

at the very beginning of my transaction, that would do the trick
right?

Wes

If you plan on locking the entire table during the load, why not just
let the IDENTITY value be assigned normally? It seems like you are
creating a load of extra work for yourself.

Roy Harvey
Beacon Falls, CT

Because I have two tables, A and B, both of which I need to bulk load.
B has a foreign key to A. A has constraints on it. B has no
constraints.
So I have two files, one for loading A and one for loading B.

If I bulk load A and some of the constraints kick out records, such
that not all of the records load, then when I load B, I will not have
a way to know how to set the foreign key in B correctly.

If I was just loading one table, your point would be totally valid.

Thanks,
Wes


.



Relevant Pages

  • Re: [opensuse] How to set up LIRC?
    ... and if not then loading it and setting it to load at boot time. ... I Googled around and learned a bit about loading kernel modules but nothing answered this question. ... Well further Google attempts and a visit to the LIRC website seemed to indicate that I need another module loaded in the kernel called lirc_serial. ...
    (SuSE)
  • Re: Next Version of GDI+ (maybe GDI+ 2.0)
    ... loading and manipulating of such files isn't lightning fast unless you have really powerfull dedicated hardware. ... to see whole image you need to read whole image, and then eventualy generate a smaller sample for display. ... BUT to have this smaler sample you need to load ALL the pixels of oryginal image. ...
    (microsoft.public.dotnet.framework.drawing)
  • RE: 66 running processes?
    ... Win XP, a firewall and an AV and about seven background utilities, and with ... want it to load right from boot up, or could you take it off the load list ... Stopping programs you use loading early is only likely to make much ...
    (microsoft.public.windowsxp.perform_maintain)
  • Re: Next Version of GDI+ (maybe GDI+ 2.0)
    ... Alejandro Lapeyre ... > loading and manipulating of such files isn't lightning fast unless you ... > smaller sample for display. ... > load ALL the pixels of oryginal image. ...
    (microsoft.public.dotnet.framework.drawing)
  • Re: Filter on a forms recordsource
    ... What I'm trying to do is to load a record with its sub details in a subform. ... without loading the whole records and details of the database. ...
    (microsoft.public.access.queries)