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

DBAmpWork directory does not exist after upgrade to DBAMP 3.5.8.0

We just upgraded to DBAMP 3.5.8. Now when we try to use sf_replicate with the pkchunk option, we get the error: "DBAmpWork directory does not exist". Here's an example of options that worked prior to the upgrade:

sf_replicate 'SALESFORCE', 'Account', 'pkchunk,batchsize(15000)'
2 people have
this problem
+1
Reply
  • Review the "Setting up the DBAmp Work Directory" in chapter 1 of the DBAmp manual.

    After you have correctly setup a work directory, retry the command.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

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

  • Thanks for the quick response, Bill! After setting up the work directory and ensuring the SQL Server login has full control, I reran and got the following error
    16:29:41: Parameters: replicate Contact_Previous VA01PSFCAPP001\DBAMP1P DBAMPARCH SALESFORCE_UNENCRYPT pkchunk,batchsize(1500)
    16:29:44: Job 75034000007ZmwVAAS created on salesforce.
    16:29:44: Error: Unable to add batch.
    16:29:44: System.Net.WebException: The remote server returned an error: (400) Bad Request.
    at System.Net.HttpWebRequest.GetResponse()
    at DBAmpNet2.JobSubmitProcessor.AddBatch()
    16:29:44: DBAmpNet2 Operation FAILED.
    16:29:46: Error: Replicate program was unsuccessful.
    16:29:46: Error: Command string is C:\"Program Files"\DBAmp\DBAmpNet2.exe Export "Replicate:pkchunk,batchsize(1500)" "Contact_Previous" "VA01PSFCAPP001\DBAMP1P" "DBAMPARCH" "SALESFORCE_UNENCRYPT"
    --- Ending SF_Replicate. Operation FAILED.
    Msg 50000, Level 16, State 1, Procedure SF_Replicate, Line 370
    --- Ending SF_Replicate. Operation FAILED.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

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

  • 1. Were you using pkchunk before the upgrade ?

    2. Why did you set the batch size to 1500 ? PKChunk can handle 100,000 to 250,000 rows at a time. Setting the batch size so low really cripples it.

    3. Are you sure the sf user specified on the linked server security page is able to submit bulk jobs to salesforce ?

    4. Login to the SF UI and navigate to the Bulk load monitoring screen. Do you see the job you just submitted ? Does it give any additional error info ?
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

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

  • 1. Yes, we were using pkchunk before the upgrade.
    2. You're right, 1500 is too low. We usually set it to 15k-20k. I will adjust to the optimal batch size when we get it working.
    3. Yes, I am using the same sf user login that we've been using for years.
    4. Yes, I see all the jobs I submitted. No errors, but there are no batches.

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

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

  • Can you replace the pkchunk,batchsize(1500) parameter with simply bulkapi
    and report the result ?
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

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

  • Results using bulkapi:
    16:56:57: Using the bulkapi with polling every 60 seconds
    16:56:58: Job Complete.
    16:56:58: Files downloaded complete.
    16:56:59: No files exist in the following directory: T:\DBAMPWORK\
    16:56:59: File load complete.
    16:56:59: 0 rows copied.
    16:56:59: No files exist in the following directory: T:\DBAMPWORK\
    16:56:59: Error: failed to delete load files.
    16:56:59: DBAmpNet2 Operation FAILED.
    16:57:01: Error: Replicate program was unsuccessful.
    16:57:01: Error: Command string is C:\"Program Files"\DBAmp\DBAmpNet2.exe Export "Replicate:bulkapi" "Account_Previous" "VA01PSFCAPP001\DBAMP1P" "DBAMPARCH" "SALESFORCE"
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

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

  • Please send an email to support@forceamp.com so we can setup a meeting to take a look.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

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

  • Bill, I think this is somewhat related to CipherCloud. Our Account object has two encrypted fields. In addition, we have two linked servers set up: one for encrypted fields, one for non-encrypted objects/fields. I get a different result depending on which linked server I use. Let's see if we can get the non-encrypted version working first.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

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

  • There was a customer who reported that CipherCloud was mangling salesforce responses when using the bulkapi. CipherCloud acknowledged this and asked us to "fix it" by accepting their modified responses. We tried but were never able to pin down from them and actual spec on their changes.

    I suspect you may be seeing the same thing.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

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

  • OK, here is an example using an object that is not encrypted. To speed up processing, we use a non-Cipher Cloud linked server. This linked server is working great for refreshes, and replicates without pkchunk.

    exec sf_replicate 'SALESFORCE_UNENCRYPT', 'Contact', 'pkchunk,batchsize(15000)'

    RESULT:
    --- Starting SF_Replicate for Contact V3.5.8
    17:07:03: Parameters: SALESFORCE_UNENCRYPT Contact pkchunk,batchsize(15000) Version: V3.5.8
    17:07:03: Drop Contact_Previous if it exists.
    17:07:03: Create Contact_Previous with new structure.
    17:07:04: DBAmpNet2 3.5.8.0 (c) Copyright 2015-2017 forceAmp.com LLC
    17:07:04: Batch size reset to 15000 rows per batch.
    17:07:04: Parameters: replicate Contact_Previous VA01PSFCAPP001\DBAMP1P DBAMPARCH SALESFORCE_UNENCRYPT pkchunk,batchsize(15000)
    17:07:08: Job 75034000007ZnASAA0 created on salesforce.
    17:07:08: Error: Unable to add batch.
    17:07:09: System.Net.WebException: The remote server returned an error: (400) Bad Request.
    at System.Net.HttpWebRequest.GetResponse()
    at DBAmpNet2.JobSubmitProcessor.AddBatch()
    17:07:09: DBAmpNet2 Operation FAILED.
    17:07:10: Error: Replicate program was unsuccessful.
    17:07:10: Error: Command string is C:\"Program Files"\DBAmp\DBAmpNet2.exe Export "Replicate:pkchunk,batchsize(15000)" "Contact_Previous" "VA01PSFCAPP001\DBAMP1P" "DBAMPARCH" "SALESFORCE_UNENCRYPT"
    --- Ending SF_Replicate. Operation FAILED.
    Msg 50000, Level 16, State 1, Procedure SF_Replicate, Line 370
    --- Ending SF_Replicate. Operation FAILED.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

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

  • Bill, I went back and reviewed the questions you asked me earlier, and this one stood out:
    "Are you sure the sf user specified on the linked server security page is able to submit bulk jobs to salesforce ? "

    The answer is still yes, the security is good as it has not changed, BUT that prompted me to look at our bulk quota. WE HIT THE THRESHOLD.

    I guess I'll have to try again tomorrow. Thanks for all your help!
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

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

  • Good catch. I wish the Salesforce api gave a more descriptive error message
    • view 2 more comments
    • In the next release, we will output a more descriptive error message from Salesforce when an error occurs.
    • Thanks, Justin! I'm trying 50k batchsize today.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

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