• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 224
  • Last Modified:

Error 7321 while changing the output path - Reg.

I have a stored procedure which generates a few files and stores it in a particular location. When I change the location to another drive I get this error.

THE ERROR NUMBER IS 7321
 THE ERROR MESSAGE IS:An error occurred while preparing the query "select * from \\VM_FILESERVER\it$\SFPC FL Citizens Takeout Data\SFPC FEB 2014 TAKEOUT4_21_2014_51218357\SFPC_FEB_2014_TAKEOUT_4_21_2014_POLICY_DETAILS.TXT" for execution against OLE DB provider "MSDASQL" for linked server "(null)".


Can some one help me out with what might be the reasons that are causing this ?

Thanks ...
0
aaronzw
Asked:
aaronzw
  • 3
  • 2
1 Solution
 
Steve WalesSenior Database AdministratorCommented:
Does the user that owns the SQL Server service have permissions on the new path ?
0
 
aaronzwProgrammerAuthor Commented:
Yes Steve !!
0
 
Steve WalesSenior Database AdministratorCommented:
The other thing that is suspect is that it says linked server (null) - I'm no expert in this particular area, but you seem to be reading a flat file as your input as an external table or something like that via a linked server ?

Did you update the definition of your linked server as well to point to the new location ?
0
Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

 
aaronzwProgrammerAuthor Commented:
Hey Steve,

The procedure uses an access database as its input and outputs the data read in the form of text files to a particular location. Now when I try changing that output location I get this error, and the linked server location is updated every time you run the procedure. And the problem is not with reading the file ... it is all about writing the output file in a new location ...
0
 
Steve WalesSenior Database AdministratorCommented:
Beyond that Service not having access to the new location, I'm out of ideas, I'm afraid.  Hopefully someone else has a bright idea.
0
 
pcelbaCommented:
"select * from \\VM_FILESERVER\it$\SFPC FL Citizens Takeout Data\SFPC FEB 2014 TAKEOUT4_21_2014_51218357\SFPC_FEB_2014_TAKEOUT_4_21_2014_POLICY_DETAILS.TXT"  does not seem to have input in Access database. Or do you have MS Access files with .TXT extension?

OK, you should post the real command you are executing and which reports the error. You should also try to use pathes without spaces otherwise SQL Server cannot recognize what is the filename and what is SQL clause.
0

Featured Post

2018 Annual Membership Survey

Here at Experts Exchange, we strive to give members the best experience. Help us improve the site by taking this survey today! (Bonus: Be entered to win a great tech prize for participating!)

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now