Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

xp_cmdshell help

Status
Not open for further replies.

ericpsu32

Programmer
Sep 15, 2003
47
US
Good afternoon.

I am going bananas with this problem. I have a procedure that extracts data and emails it out as an excel spreadsheet. I am reusing BCP code that works within another process and it works beautifully on my computer, but on our production system on any other user machines, it fails. I have logged in as a different user and ran the procedure and get the following message...
Code:
Msg 50001, Level 1, State 50001
xpsql.cpp: Error 1314 from CreateProcessAsUser on line 636

Error:  @attachment file "\\SQL\TEMP\LEWIS152280009107302007.xls" does not exist
Server: Msg 50000, Level 16, State 1, Procedure sp_smtp_sendmail, Line 30
Sending message using xp_smtp_sendmail failed
Any help would be most appreciated!

Thanks
 
Dont know how you might be accomplishing this but the problem may be similar to a problem I had using Enterprise Manager and DTS. When I create a DTS package in EM on my computer, all is good. When I then schedule it to run, it fails. Because the path names are relative to mapped drives from my machine. The solution for me was to login to the server using remote desktop and create the DTS on the same machine it will run on. That way path names are correct.

Just a possibility to look into.
 
Rac2

Thanks, I had that same issue you spoke of before and did pretty much the same thing you suggest to get around it.

The problem I am having now has to do with rights. I gave a test user sys admin rights and the procedure worked under their login. I don't want to do that. I need some way to programmatically have those rights granted then removed after.

I have tried a variety of things to no avail. There is a lot of stuff out there about proxy accounts, but I tried that too and it still gave me the same message. Hence the reason I am pulling my hair out over here.
 
I am not gonna be able to help you. Windows security confounds me. We migrated to Win2003 recently and half my jobs dont run due to security issues. So I am running them manually until I crack the secrets.

You may wish to start a new thread with a little more information about what you are trying to do. I think new threads get more attention.

Sorry I cant help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top