Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

sql agent job output file to different server has error Expand / Collapse
Author
Message
Posted Monday, March 18, 2013 10:47 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Wednesday, June 25, 2014 1:21 PM
Points: 198, Visits: 406
I have a SQL agent job that selects from a table and using the advanced options I can send the results to a test file. It works fine. But I'd like to send the file to a different server and am getting an error: "Executed as user: MGH\sqlagent. Unable to open Step output file. The step succeeded."
I added permission for the sql agent service account on the other server. I'm using output path like: \\servername\foldername\filename.txt
Is that syntax correct? Am I missing some permission on the other server?
Thanks very much for any help.
Post #1432269
Posted Monday, March 18, 2013 11:28 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Tuesday, August 26, 2014 7:27 AM
Points: 2,836, Visits: 5,067
Your MGH\sqlagent should have full-control access to the folder on your "different server".
Also, check if you can ping your "different server" from the SQL one.



_____________________________________________
"The only true wisdom is in knowing you know nothing"
"O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!"
(So many miracle inventions provided by MS to us...)

How to post your question to get the best and quick help
Post #1432281
Posted Monday, March 18, 2013 11:54 AM
SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Tuesday, August 26, 2014 4:16 PM
Points: 4,389, Visits: 9,526
Make sure the SQL Server service account has access to the share. If your agent job is running as a sysadmin user it actually runs in the context of that service account, not as the agent service account.

Jeffrey Williams
Problems are opportunites brilliantly disguised as insurmountable obstacles.

How to post questions to get better answers faster
Managing Transaction Logs
Post #1432289
Posted Monday, March 18, 2013 12:00 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Wednesday, June 25, 2014 1:21 PM
Points: 198, Visits: 406
I can ping the other server from the server where the job runs. I have added full control to the share file on the other server where I want the file to go. For the sql agent and the sql server service accounts. Still same error. Thanks for the ideas. Will continue to try.
Post #1432294
Posted Monday, March 18, 2013 12:11 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Wednesday, June 25, 2014 1:21 PM
Points: 198, Visits: 406
I found the problem. I had to put the drive letter in the path name. Like:
\\servername\d$\foldername\filename.txt
Thanks to everyone for taking the time to help me with this.
Post #1432299
Posted Monday, March 18, 2013 3:54 PM
SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Tuesday, August 26, 2014 4:16 PM
Points: 4,389, Visits: 9,526
Denise McMillan (3/18/2013)
I found the problem. I had to put the drive letter in the path name. Like:
\\servername\d$\foldername\filename.txt
Thanks to everyone for taking the time to help me with this.


That tells me the folder in question here is not a shared folder. And, you added the service accounts as local administrator on the system where that folder exists.

Using the administrative share in this manner will work, but it is not the recommended approach. I would recommend that you review the folder and make sure it is shared with appropriate rights for each user - and change the path to the shared folder path.


Jeffrey Williams
Problems are opportunites brilliantly disguised as insurmountable obstacles.

How to post questions to get better answers faster
Managing Transaction Logs
Post #1432370
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse