function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SFDC DevlSFDC Devl 

Data loader from commandline

Hello, I am trying to run data loader from command line with an encrypted password and the key. It doesnt seem to work and says invalid password . Here are the steps I followed
Open Command prompt
cd C:\Program Files\salesforce.com\Data Loader\bin
C:\Program Files\salesforce.com\Data Loader\bin encrypt.bat -g secretkey
It gave a string and I saved it to  "folderpath/key.txt"

C:\Program Files\salesforce.com\Data Loader\bin encrypt.bat encrypt.bat -e passwordsecuritytoken "folderpath/key.txt"
It gave another long string

I copied this in the process-conf.xml file

                <entry key="sfdc.username" value="xyx"/>                
                <entry key="sfdc.password" value="encryptedpasswordstring"/>
                <entry key="process.encryptionKeyFile" value="D:\SFDC\DataLoader\Process\key.txt"/>

When I run the bat file in the command prompt, the process starts and fails because of invalid passwor. I tried to decrypt the encrypted password and it matches. So i am not really sure whats happening.

Can anyone think of anything that I could have missed?

Thank you!


 
Best Answer chosen by SFDC Devl
SFDC DevlSFDC Devl
ITS RESOLVED guys! The issue is with a special character that I have used in the password. Password had '^' and when I checked the debug logs from data loader I saw this character was missing. When the password was decrytpted, looks like it has some issues with some special characters. However when I tried to the command to verify the encrypted password, it said it matched and thats why the trouble shooting was hard. I did reset the password and it started working. This time I did not use '^' :)

I couldnt find any documentation about some special characters not being supported. I hope this post will help others.

All Answers

AG_SFDCAG_SFDC
Hi Mounika,

Did you try to attach the Security Token to the password and try?

Thanks,
AG
SFDC DevlSFDC Devl
Yes I did append securitytoken along with the password and then encrypted. Thanks for your quick response!
AG_SFDCAG_SFDC
Are you giving the correct UserName? Because your UserName in sandbox will be different from UserName in Production.
SFDC DevlSFDC Devl
Yes, I did. The login history in prod shows invalid password so that means it was trying to attempt for a login.
AG_SFDCAG_SFDC
Are you able to login from regular data loader not from the command line?
SFDC DevlSFDC Devl
Yes, with the same credentials.
AG_SFDCAG_SFDC

I would suggest to look into the following links:

This one is for comman errors:
http://www.jitendrazaa.com/blog/salesforce/tutorial-of-command-line-dataloader-salesforce/

This is a similar question:
https://developer.salesforce.com/forums/?id=906F00000008pfgIAA

Let me know if any of the above links worked for you.

Thanks,
AG
 

SFDC DevlSFDC Devl
ITS RESOLVED guys! The issue is with a special character that I have used in the password. Password had '^' and when I checked the debug logs from data loader I saw this character was missing. When the password was decrytpted, looks like it has some issues with some special characters. However when I tried to the command to verify the encrypted password, it said it matched and thats why the trouble shooting was hard. I did reset the password and it started working. This time I did not use '^' :)

I couldnt find any documentation about some special characters not being supported. I hope this post will help others.
This was selected as the best answer