Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2012
    Posts
    11

    Question Unanswered: BULK Insert into location problem ?

    Hello,

    I am transfering data between ASE 15.0 -> IQ 12.7 servers using
    insert into IqTable location 'AseServer' 'select * from AseTable where id <= a_given_id '

    After each insert I verify with the nr of instruments in IqTable, and rarely (1 in 50) it inserts only 98-99% from the nr of rows the select statement actually returned, any ideas why ?
    After each insert I check @@error and every time it runs without error.


    As a note : I have set option <user>.LOAD_MEMORY_MB=300 (because with default 0, it failed > All available virtual memory has been used; allocation cancelled).
    Tablewidth(IqTable) = 8989

    Thanks,
    Sorin

  2. #2
    Join Date
    Jan 2004
    Posts
    545
    Provided Answers: 4
    Does the select return only unique rows? And does IqTable have an unique index?

    Also, try to name all columns in the select instead of select *. You want to control which column from ASETable goes where in IqTable.
    I'm not crazy, I'm an aeroplane!

  3. #3
    Join Date
    Oct 2012
    Posts
    11
    Does the select return only unique rows?
    YES
    And does IqTable have an unique index?
    YES, it has a primary key on an int identity (clustered index)
    Also, try to name all columns in the select instead of select *
    The actual code had the columns in select explicitly written down, I wrote * just because I thought this did not count and to make the post shorter and easier to read.

    As an addon :
    This happened when I was inserting a only a subset of columns from the original table (ASE) into the destination table (IQ). If I made both tables identical and used select * the bulk copy performed ok each time. Anyways I've added a verification step after each bulk copy (check if the last id has actually reached the destination).

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •