Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 SQL job is not writing on remote text flle

Author  Topic 

kshahzad
Starting Member

45 Posts

Posted - 2013-07-08 : 14:30:51
Iam trying to crate a job, that writes the result set on text file and export to location like "\\abc\xyz.txt"

job succeeds but i cant see any thing written on the file and i have given the same path in the job path option.

James K
Master Smack Fu Yak Hacker

3873 Posts

Posted - 2013-07-08 : 17:09:56
If you change the export location to a local drive, are you able to do the export successfully? If you are, then it is a permissions issue - i.e., the login that is running the job does not have write access to the network share.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-07-09 : 00:59:59
how are you trying to do export? is it bcp or SSIS? I guess it should be bcp. I've had this issue couple of times when calling bcp using xp_cmdshell from t-sql procedure. Try running the bcp command in command prompt and see if it succeeds. then it might be permission issue with account that sql agent uses.
In ideal scenario you should create a proxy account for doing this and give it only required access by job like access to your shared path etc. dont use system account for this.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

kshahzad
Starting Member

45 Posts

Posted - 2013-07-09 : 16:22:38
thanks
Go to Top of Page
   

- Advertisement -