SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SQL job failed


SQL job failed

Author
Message
girl_bj
girl_bj
Say Hey Kid
Say Hey Kid (668 reputation)Say Hey Kid (668 reputation)Say Hey Kid (668 reputation)Say Hey Kid (668 reputation)Say Hey Kid (668 reputation)Say Hey Kid (668 reputation)Say Hey Kid (668 reputation)Say Hey Kid (668 reputation)

Group: General Forum Members
Points: 668 Visits: 188
I did an SFTP to command the job via winSCP.

I manage to run execute it in SSIS.

When I try to schedule it in SQL Agent, I'm getting this error:

Code: 0xC002914C Source: Execute Process Task Execute Process Task Description: The process timed out. End Error DTExec: The package execution returned DTSER_FAILURE (1).

I did set password EncryptSensitiveWithPassword.

In the SQL agent job it manage to pump in the data to my local folder but will hit the error as above to SFTP over.

Execute in SSIS is successful.

How can I fix this?
Koen Verbeeck
Koen Verbeeck
SSC Guru
SSC Guru (147K reputation)SSC Guru (147K reputation)SSC Guru (147K reputation)SSC Guru (147K reputation)SSC Guru (147K reputation)SSC Guru (147K reputation)SSC Guru (147K reputation)SSC Guru (147K reputation)

Group: General Forum Members
Points: 147052 Visits: 13350
Maybe a permission issue with the SQL Agent account?
Did you use a proxy to run the SSIS job step?

You can try to log the details of the winscp command to a log file. Add > log.txt add the end of your command.


How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
My blog at SQLKover.

MCSE Business Intelligence - Microsoft Data Platform MVP
jimbobmcgee
jimbobmcgee
SSChasing Mays
SSChasing Mays (600 reputation)SSChasing Mays (600 reputation)SSChasing Mays (600 reputation)SSChasing Mays (600 reputation)SSChasing Mays (600 reputation)SSChasing Mays (600 reputation)SSChasing Mays (600 reputation)SSChasing Mays (600 reputation)

Group: General Forum Members
Points: 600 Visits: 918
At a guess, I would say that WinSCP is prompting for a password it never receives.

How are you logging into your target SFTP server? Are you using its in-built stored sessions to store a password (or private key)?

If so, the sessions are stored in a user-specific registry key (HKEY_CURRENT_USER\Software\Martin Prikryl\WinSCP 2\Sessions). This will not be the same for your user as for the user running your SQL Server Agent.

Two options I can think of (if this is indeed the issue):

1. Define a proxy account for the user that stored the session in WinSCP, and run the WinSCP step/job under that proxy account

2. Export the WinSCP user-specific registry keys and import them into the user hive for the user running your SQL Server Agent

For example, if your SQL Server Agent is running as NETWORK SERVICE:
1. Open REGEDIT
2. Navigate to the "HKEY_CURRENT_USER\Software\Martin Prikryl" key
3. Right-click the "WinSCP 2" key and choose Export - specify a filename
4. Open that file with a good text editor
5. Replace all instances on "HKEY_CURRENT_USER" with "HKEY_USERS\S-1-5-20" and save
6. In REGEDIT, go to File >> Import, and select your edited .reg file

Now NETWORK SERVICE should have the same saved sessions as your own user account.

(I should point out that manual fudging of the Registry, without knowing what you are doing and without a really good, thoroughly tested backup is a really bad idea -- make sure you test this on a non-essential test server, and have a good backup of your production first)

HTH
J.
girl_bj
girl_bj
Say Hey Kid
Say Hey Kid (668 reputation)Say Hey Kid (668 reputation)Say Hey Kid (668 reputation)Say Hey Kid (668 reputation)Say Hey Kid (668 reputation)Say Hey Kid (668 reputation)Say Hey Kid (668 reputation)Say Hey Kid (668 reputation)

Group: General Forum Members
Points: 668 Visits: 188
i hit error accessing the registry during importing.
Phil Parkin
Phil Parkin
SSC Guru
SSC Guru (129K reputation)SSC Guru (129K reputation)SSC Guru (129K reputation)SSC Guru (129K reputation)SSC Guru (129K reputation)SSC Guru (129K reputation)SSC Guru (129K reputation)SSC Guru (129K reputation)

Group: General Forum Members
Points: 129418 Visits: 22595
girl_bj0619 (7/8/2013)
i hit error accessing the registry during importing.


The package failed with a registry-access error while you were performing an import?

What was the error message?


Help us to help you. For better, quicker and more-focused answers to your questions, consider following the advice in this link.

If the answer to your question can be found with a brief Google search, please perform the search yourself, rather than expecting one of the SSC members to do it for you.

Please surround any code or links you post with the appropriate IFCode formatting tags. It helps readability a lot.
girl_bj
girl_bj
Say Hey Kid
Say Hey Kid (668 reputation)Say Hey Kid (668 reputation)Say Hey Kid (668 reputation)Say Hey Kid (668 reputation)Say Hey Kid (668 reputation)Say Hey Kid (668 reputation)Say Hey Kid (668 reputation)Say Hey Kid (668 reputation)

Group: General Forum Members
Points: 668 Visits: 188
Cannot import. Error accessing the registry.
Phil Parkin
Phil Parkin
SSC Guru
SSC Guru (129K reputation)SSC Guru (129K reputation)SSC Guru (129K reputation)SSC Guru (129K reputation)SSC Guru (129K reputation)SSC Guru (129K reputation)SSC Guru (129K reputation)SSC Guru (129K reputation)

Group: General Forum Members
Points: 129418 Visits: 22595
girl_bj0619 (7/9/2013)
Cannot import. Error accessing the registry.


You did not answer my first question and your error message was not the exact error message which you received.

If you provide only snippets of detail rather than the full story, it makes it very difficult for me to understand what is going on.


Help us to help you. For better, quicker and more-focused answers to your questions, consider following the advice in this link.

If the answer to your question can be found with a brief Google search, please perform the search yourself, rather than expecting one of the SSC members to do it for you.

Please surround any code or links you post with the appropriate IFCode formatting tags. It helps readability a lot.
girl_bj
girl_bj
Say Hey Kid
Say Hey Kid (668 reputation)Say Hey Kid (668 reputation)Say Hey Kid (668 reputation)Say Hey Kid (668 reputation)Say Hey Kid (668 reputation)Say Hey Kid (668 reputation)Say Hey Kid (668 reputation)Say Hey Kid (668 reputation)

Group: General Forum Members
Points: 668 Visits: 188
I hit that error on after trying on steps number:

6. In REGEDIT, go to File >> Import, and select your edited .reg file

That's the error I get.
Phil Parkin
Phil Parkin
SSC Guru
SSC Guru (129K reputation)SSC Guru (129K reputation)SSC Guru (129K reputation)SSC Guru (129K reputation)SSC Guru (129K reputation)SSC Guru (129K reputation)SSC Guru (129K reputation)SSC Guru (129K reputation)

Group: General Forum Members
Points: 129418 Visits: 22595
Right - sounds like you have limited rights on that PC. Can you find someone with local admin rights who can do it for you?


Help us to help you. For better, quicker and more-focused answers to your questions, consider following the advice in this link.

If the answer to your question can be found with a brief Google search, please perform the search yourself, rather than expecting one of the SSC members to do it for you.

Please surround any code or links you post with the appropriate IFCode formatting tags. It helps readability a lot.
jimbobmcgee
jimbobmcgee
SSChasing Mays
SSChasing Mays (600 reputation)SSChasing Mays (600 reputation)SSChasing Mays (600 reputation)SSChasing Mays (600 reputation)SSChasing Mays (600 reputation)SSChasing Mays (600 reputation)SSChasing Mays (600 reputation)SSChasing Mays (600 reputation)

Group: General Forum Members
Points: 600 Visits: 918
girl_bj0619 (7/9/2013)
Cannot import. Error accessing the registry.


If you don't have the OS privileges to globally edit your Registry, you'll need the assistance of your server administrators. If you can't get their assistance, you will have to go with the first option of running your job with a proxy account.

Of course, if you don't have the SQL Server privileges to create a proxy account, you're going to need to ask your DBA.

Otherwise, perhaps you can do your SFTP using an .NET Script Task, linking in a reputable SFTP library. http://winscp.net/eng/docs/library_ssis has an example. However, you may need to ask your server administrators to import the library into the central store for .NET assemblies (the GAC).
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum








































































































































































SQLServerCentral


Search