October 24, 2012 at 10:51 am
I have a situation where I am checking to see if a file exists before I create a file. I don't want to overwrite an existing file. If the file exists I append an underscore and a sequence number to the file name and then write to the new file.
The problem I have is that when I run the command "EXEC Master.dbo.xp_fileexist" as the sa user, the command returns that the file does exist and all works as expected. Yet, when I run the command as the application user (which uses the proxy account), it returns that the file does not exist so it appends to the existing file.
Anyone know what is missing? Why am I getting different results as different users? When I write to the file, I am using the "EXEC master..xp_cmdshell" command with the bcp command using a proxy account. That works.
Thank you.
Tammy
November 20, 2012 at 5:17 am
Did you get a chance to read this, hope this helps!
http://www.sqlservercentral.com/articles/Stored+Procedures/xpfileexist/183/
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy