Help get this topic noticed by sharing it on Twitter, Facebook, or email.

UpdatePayPalinfo4_3: System.LimitException: Too many query rows: 50001

Hi

I need to update one column in salesforce table using DBAmp .
I'm using Query

select CP.Id,(CD.amount/100) as Payment_Charged__c
,Cast('' as nvarchar(255)) as Error
into Paypal__c_Update
from SalesForceDB..Staging_Paypal__c CP
Inner join (
select * from Audney.dbo.Customer_Debit)CD
ON CP.col1=CD.col2

Exec sf_bulkops 'Update','SALESFORCE','Paypal__c_Update'

When i do this I get an error ;

UpdatePayPalinfo4_3: System.LimitException: Too many query rows: 50001

(1100 row(s) affected)
--- Starting SF_BulkOps for Paypal__c_Update
01:38:59: Run the DBAmp.exe program.
01:38:59: DBAmp Bulk Operations. V2.16.1 (c) Copyright 2006-2013 forceAmp.com LLC
01:38:59: Updating Salesforce using Paypal__c_Update (
01:38:59: DBAmp is using the SQL Native Client.
01:39:02: SOAP Headers:
01:39:25: 1100 rows read from SQL Table.
01:39:25: 1100 rows failed. See Error column of row for more information.
01:39:25: 0 rows successfully processed.
01:39:25: Errors occurred. See Error column of row for more information.
01:39:25: Error: DBAmp.exe was unsuccessful.
01:39:25: Error: Command string is C:\"Program Files"\DBAmp\DBAmp.exe update Paypal__c_Update "salesforce backups" "SALESFORCE" " "
--- Ending SF_BulkOps. Operation FAILED.
Msg 50000, Level 16, State 1, Procedure SF_BulkOps, Line 125
SF_BulkOps Error: 01:38:59: DBAmp Bulk Operations. V2.16.1 (c) Copyright 2006-2013 forceAmp.com LLC01:38:59: Updating Salesforce using Paypal__c_Update .01:38:59: DBAmp is using the SQL Native Client.01:39:02: SOAP Headers: 01:39:25: 1100 rows read from SQL Table.01:39:25: 1100 rows failed. See Error column of row for more information.01:39:25: 0 rows successfully processed.01:39:25: Errors occurred. See Error column of row for more information.

I googled it and found that we can not perform BULKLoad .

What is this error?

I can only update 9 rows at a time. :( .. I need to update many rows.

Please help me to resolve this issue.
1 person has
this problem
+1
Reply
  • The error is caused by a trigger someone in your organization wrote for that object.

    The trigger is executing a query that is pulling too many rows. I would contact the trigger author and let them know you are getting this error. More than likely, the trigger code will need to rewritten to handle larger batches of records.

    In the interim, you can add the batchsize parameter to your sf_bulkops call to reduce the size of the batches it sends to salesforce. It will still send the entire table but just do it in smaller batch sizes to accommodate the poorly written trigger.

    Exec sf_bulkops 'Update:batchsize(9)','SALESFORCE','Paypal__c_Update'
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited sad, anxious, confused, frustrated

  • now it fails for 9 rows updation.

    Exec sf_bulkops 'Update:batchsize(9)','SALESFORCE','Paypal__c_Update'

    (9 row(s) affected)
    --- Starting SF_BulkOps for Paypal__c_Update
    05:23:02: Run the DBAmp.exe program.
    05:23:02: DBAmp Bulk Operations. V2.16.1 (c) Copyright 2006-2013 forceAmp.com LLC
    05:23:02: Updating Salesforce using Paypal__c_Update (TWIS-SQL2008 / salesforce backups) .
    05:23:03: DBAmp is using the SQL Native Client.
    05:23:03: Batch size reset to 9 rows per batch.
    05:23:04: SOAP Headers:
    05:23:07: 9 rows read from SQL Table.
    05:23:07: 9 rows failed. See Error column of row for more information.
    05:23:07: 0 rows successfully processed.
    05:23:07: Errors occurred. See Error column of row for more information.
    05:23:07: Error: DBAmp.exe was unsuccessful.
    05:23:07: Error: Command string is C:\"Program Files"\DBAmp\DBAmp.exe update:batchsize(9) Paypal__c_Update "TWIS-SQL2008" "salesforce backups" "SALESFORCE" " "
    --- Ending SF_BulkOps. Operation FAILED.
    Msg 50000, Level 16, State 1, Procedure SF_BulkOps, Line 125
    SF_BulkOps Error: 05:23:02: DBAmp Bulk Operations. V2.16.1 (c) Copyright 2006-2013 forceAmp.com LLC05:23:02: Updating Salesforce using Paypal__c_Update (TWIS-SQL2008 / salesforce backups) .05:23:03: DBAmp is using the SQL Native Client.05:23:03: Batch size reset to 9 rows per batch.05:23:04: SOAP Headers: 05:23:07: 9 rows read from SQL Table.05:23:07: 9 rows failed. See Error column of row for more information.05:23:07: 0 rows successfully processed.05:23:07: Errors occurred. See Error column of row for more information.

    Please help me
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited sad, anxious, confused, frustrated

  • I can't help you because I did not write the trigger.

    Ask your salesforce admin to disable the update trigger on the Paypal__c table until it can be properly rewritten.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly indifferent, undecided, unconcerned happy, confident, thankful, excited sad, anxious, confused, frustrated