SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 SQL job is not writing on remote text flle
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

kshahzad
Starting Member

45 Posts

Posted - 07/08/2013 :  14:30:51  Show Profile  Reply with Quote
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
Flowing Fount of Yak Knowledge

3557 Posts

Posted - 07/08/2013 :  17:09:56  Show Profile  Reply with Quote
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

India
52309 Posts

Posted - 07/09/2013 :  00:59:59  Show Profile  Reply with Quote
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 - 07/09/2013 :  16:22:38  Show Profile  Reply with Quote
thanks
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.11 seconds. Powered By: Snitz Forums 2000