# Database Discussions > Microsoft SQL Server 2005 >  FTP TASK in SSIS

## ravi

Hello,
I'm uisng  FTP task for sending file to different domain.
I have spacial ID for access FTP and using the same FTP connection manager. It is working fine if i'm running this task manuly but not working as sql agent job. Do I need to have same ID for SQL agent service and FTP process. My sql agent service  is running in different account.
I appreciate you input for this issue.

----------


## rmiao

Yes, sql agent service account needs permission to access ftp. Or you can try setup that special ID as proxy account in sql2k5.

----------


## ravi

rmiao,
I did create proxy a/c and ran the job using this new credentail. I'm getting the following error.
What I'm doing wrong now?

Unable to start execution of step 1 (reason: Could not get proxy data for proxy_id = 2).  The step failed.

----------


## rmiao

How did you set proxy account?

----------


## ravi

I created a Credential and then created Proxy A/c
In Object Explorer, expand a server.

Expand SQL Server Agent.

Right-click Proxies and select New Proxy.

On the General page of the New Proxy Account dialog, specify the proxy name, credential name, and description for the new proxy.  
After done this I have created job with run as this proxy A/C.
I have tried to use windows and SQL log in but still getting the same error.
What i'm doing wrong here?

----------


## rmiao

Did you use your special FTP id as proxy account?

----------


## ravi

Yes, I did use that , it is not able to run the job at all now.

----------


## rmiao

Who is job owner? Can you post more details of your setting?

----------


## ravi

Hi Rmiao,
I appreciate your cooperation on this.
I'm the job owner and I have all admin right to this server.
here are some more info about my settings,
Created a Credential with below value
Credential Name=FTP_USER.
identity =FTP_ID(which is given by client and I have created as SQL Login too)
password=whatever password given by client
Created Proxy Account
Proxy Name=FTP_ID
Credential Name-FTP_USER
Active to the following subsystem: checked for SQL Server Integration Service Package
Principals - Assigned all the Msdb roles(SQLAgentReaderRole,SQLAgentOpertorRole,SQLAg  entUserRole)
Created the job with Run as this proxy ID=FTP_ID
But still I'm getting the below Error

Unable to start execution of step 1 (reason: Could not get proxy data for proxy_id = 5)

----------


## rmiao

Is FTP_ID a domain account? Did you let the proxy run cmdexec? How about the job? Run ftp command or SSIS task in the job?

----------


## ravi

FTP_ID is SQL log in Account. I have chagned in my ID as I'm in the domain account. But event mine is not working.

----------


## rmiao

What's your special ID for accessing FTP?

----------


## ravi

Yes , Rmiao, 
I can able to send the files using that spacail ID(FPT_ID) if I'm running the job manualy.

----------


## rmiao

Did you set that special windows account as proxy account? Who is job owner? Is job owner a member of sysadmin role?

----------


## ravi

Rmiao,
I think you lossing the track on my existting reply.
Here is my configuration settings.


I'm the job owner and I have all admin right to this server.
here are some more info about my settings,
Created a Credential with below value
Credential Name=FTP_USER.
identity =FTP_ID(which is given by client and I have created as SQL Login too)
password=whatever password given by client
Created Proxy Account
Proxy Name=FTP_ID
Credential Name-FTP_USER
Active to the following subsystem: checked for SQL Server Integration Service Package
Principals - Assigned all the Msdb roles(SQLAgentReaderRole,SQLAgentOpertorRole,SQLAg entUserRole)
Created the job with Run as this proxy ID=FTP_ID
But still I'm getting the below Error

Unable to start execution of step 1 (reason: Could not get proxy data for proxy_id = 5)

----------


## ravi

Bye the way , Our sql server is Clustering with 2 nodes.

----------


## rmiao

Did you check sql agent error log to see if have any details?

----------


## ravi

Yes, I just checked the SQL log and getting the below Error.

SQLServer Error: 22046, Encryption error using CryptProtectData. [SQLSTATE 42000

----------


## rmiao

Not sure if it's related. Checked sql agent error log?

----------


## jmansford

I've also been having problems with this.  It's down to which option you choose on the "ProtectionLevel" property on the package.  Check what you have that set to, I suspect you have it set to EncryptWithUserKey which, obviously when you run it as another user doesn't work.

Checkout these links and vote if you agree:
http://lab.msdn.microsoft.com/produc...2-bc18e0568f2e
http://lab.msdn.microsoft.com/produc...5-b5077f5f2380 

Hope that helps,

Joel Mansford MCSE.

----------


## ravi

Joel Mansford ,
You are right. I'm able to execute the package after change the Protection level into EncryptSensitiveWithPassword. And also stored the package in msdb database with selection of the prtoectionlevel  "rely on server storage and....".
Micrrosoft should have provided more information related to this task.
Thanks,
Ravi

----------

