May 8, 2013 at 1:06 pm
Hello. Anyone seen a CmdExec job step hang before? When I manually invoke the job, nothing but the spinning green progress wheel. All the job is doing is:
robocopy "\\Server\UNCShare" "C:\LocalFolder" *.txt /MOV
I've never seen this before. I have run enable xp_cmdshell and reconfigure. Anyone have any ideas?
Thanks in advance.
May 8, 2013 at 1:58 pm
Do you have windows permissions to the UNC path? If you can't run it from Command Prompt, it sounds like a Windows permissions issue.
--------
For SQL Tips, check out my blog: http://lantztechknowledge.blogspot.com/[/url]
You can also follow my twitter account to get daily updates: @BLantz2455
May 8, 2013 at 2:13 pm
Thanks for replying. Permissions have been confirmed, both share and NTFS.
May 8, 2013 at 2:16 pm
And you still can't run it from command prompt? If not, still permissions
--------
For SQL Tips, check out my blog: http://lantztechknowledge.blogspot.com/[/url]
You can also follow my twitter account to get daily updates: @BLantz2455
May 8, 2013 at 3:07 pm
Thats the thing...I can manually run the robocopy statement directly in a cmd window and can run it via batch file. Both move the file(s) expected.. Soon as I try to run it through a job step, it just hangs.
May 8, 2013 at 3:39 pm
dmcquilken (5/8/2013)
Thanks for replying. Permissions have been confirmed, both share and NTFS.
Permissions confirmed for which user account?
MM
select geometry::STGeomFromWKB(0x0106000000020000000103000000010000000B0000001000000000000840000000000000003DD8CCCCCCCCCC0840000000000000003DD8CCCCCCCCCC08408014AE47E17AFC3F040000000000104000CDCCCCCCCCEC3F9C999999999913408014AE47E17AFC3F9C99999999991340000000000000003D0000000000001440000000000000003D000000000000144000000000000000400400000000001040000000000000F03F100000000000084000000000000000401000000000000840000000000000003D0103000000010000000B000000000000000000143D000000000000003D009E99999999B93F000000000000003D009E99999999B93F8014AE47E17AFC3F400000000000F03F00CDCCCCCCCCEC3FA06666666666FE3F8014AE47E17AFC3FA06666666666FE3F000000000000003D1800000000000040000000000000003D18000000000000400000000000000040400000000000F03F000000000000F03F000000000000143D0000000000000040000000000000143D000000000000003D, 0);
May 9, 2013 at 2:32 pm
They were confirmed for the SQL Server Agent user account.
Problems been fixed and it turns out to have been permissions related all along, but with an unconvensional solution and obscured problem.
I setup SQL job step to run cmdexec (robocopy) and activex (vbs) to move files from UNC to local. In both cases, the step would just hang. Manually starting the job/step would just show the green progress cicle spinning indefinitely.
When I changed the cmdexec step from robocopy to just "copy", the permission denied error was exposed. WOrking with the infrastructure team, they confirmed the SQL agent accoutn to have NTFS full control and everyone share. It wasnt till they gave the service account local admin on the source host that the problem was fixed. This is not a long term solution, so im going to continue to work with them to identify why ntfs/share permission only are not enough.
Any case, now both robocopy and cscript (with vbs) work correctly. Job will stay as cmdexec rather than vbs.
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply